package cn.edu.jxust.common.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author QiuKangming
 * @version 1.0
 * @description
 * @since 2020/07/02 09:39
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor

public class AuthorityVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 资源id
     */
    private Integer id;

    @NotNull(message = "父权限 id 号不能为空")
    private Integer parentId;

    @NotBlank(message = "权限名称不能为空")
    private String resourceName;

    @NotBlank(message = "权限码不能为空")
    private String resourceCode;

    @NotNull(message = "权限类型不能为空")
    private Integer resourceType;

    /**
     * 是否拥有该权限
     */
    private Integer isAuthced;

    /**
     * 该资源状态
     */
    private Integer status;

    /**
     * 子资源列表
     */
    private List<AuthorityVo> children;

}
